package ma.xin.shi.configurations.SomeipAction;

import java.util.ArrayList;
import java.util.List;

public class SomeipActionEntry {
    private String serviceName;
    private String serviceId;
    private String instanceId;
    private String majorVersion;
    private String minorVersion;
    private String ttl;
    private String vid;
    private String vName;
    private String vPriority;
    private String transportProtocol;
    private String server;
    private String serverIp;
    private String serverIpSubMask;
    private String serverPort;
    private String client;
    private String clientId;
    private String clientIpUni;
    private String clientIpSubMask;
    private String clientPort;
    private List<String> sList = new ArrayList<>();
    private List<String> cList = new ArrayList<>();

    // Getters and Setters

    public String getServiceName() { return serviceName; }
    public void setServiceName(String serviceName) { this.serviceName = serviceName; }

    public String getServiceId() { return serviceId; }
    public void setServiceId(String serviceId) { this.serviceId = serviceId; }

    public String getInstanceId() { return instanceId; }
    public void setInstanceId(String instanceId) { this.instanceId = instanceId; }

    public String getMajorVersion() { return majorVersion; }
    public void setMajorVersion(String majorVersion) { this.majorVersion = majorVersion; }

    public String getMinorVersion() { return minorVersion; }
    public void setMinorVersion(String minorVersion) { this.minorVersion = minorVersion; }

    public String getTtl() { return ttl; }
    public void setTtl(String ttl) { this.ttl = ttl; }

    public String getVid() { return vid; }
    public void setVid(String vid) { this.vid = vid; }

    public String getVName() { return vName; }
    public void setVName(String vName) { this.vName = vName; }

    public String getVPriority() { return vPriority; }
    public void setVPriority(String vPriority) { this.vPriority = vPriority; }

    public String getTransportProtocol() { return transportProtocol; }
    public void setTransportProtocol(String transportProtocol) { this.transportProtocol = transportProtocol; }

    public String getServer() { return server; }
    public void setServer(String server) { this.server = server; }

    public String getServerIp() { return serverIp; }
    public void setServerIp(String serverIp) { this.serverIp = serverIp; }

    public String getServerIpSubMask() { return serverIpSubMask; }
    public void setServerIpSubMask(String serverIpSubMask) { this.serverIpSubMask = serverIpSubMask; }

    public String getServerPort() { return serverPort; }
    public void setServerPort(String serverPort) { this.serverPort = serverPort; }

    public String getClient() { return client; }
    public void setClient(String client) { this.client = client; }

    public String getClientId() { return clientId; }
    public void setClientId(String clientId) { this.clientId = clientId; }

    public String getClientIpUni() { return clientIpUni; }
    public void setClientIpUni(String clientIpUni) { this.clientIpUni = clientIpUni; }

    public String getClientIpSubMask() { return clientIpSubMask; }
    public void setClientIpSubMask(String clientIpSubMask) { this.clientIpSubMask = clientIpSubMask; }

    public String getClientPort() { return clientPort; }
    public void setClientPort(String clientPort) { this.clientPort = clientPort; }

    public List<String> getsList() { return sList; }
    public void setsList(List<String> sList) { this.sList = sList != null ? sList : new ArrayList<>(); }

    public List<String> getcList() { return cList; }
    public void setcList(List<String> cList) { this.cList = cList != null ? cList : new ArrayList<>(); }
    
    private List<MulticastEntry> multicastEntries = new ArrayList<>();

    // Getter and Setter
	 public List<MulticastEntry> getMulticastEntries() {
	     return multicastEntries;
	 }
	
	 public void setMulticastEntries(List<MulticastEntry> multicastEntries) {
	     this.multicastEntries = multicastEntries != null ? multicastEntries : new ArrayList<>();
	 }
	
	 // Helper method to add one entry
	 public void addMulticastEntry(MulticastEntry entry) {
	     if (entry != null) {
	         multicastEntries.add(entry);
	     }
	 }

	 
}
